var CryptoJS = CryptoJS || function (y, e) {
    var h = {}, g = h.lib = {}, A = function () {
    }, z = g.Base = {
        extend: function (b) {
            A.prototype = this;
            var d = new A;
            b && d.mixIn(b);
            d.hasOwnProperty("init") || (d.init = function () {
                d.$super.init.apply(this, arguments)
            });
            d.init.prototype = d;
            d.$super = this;
            return d
        }, create: function () {
            var b = this.extend();
            b.init.apply(b, arguments);
            return b
        }, init: function () {
        }, mixIn: function (b) {
            for (var d in b) {
                b.hasOwnProperty(d) && (this[d] = b[d])
            }
            b.hasOwnProperty("toString") && (this.toString = b.toString)
        }, clone: function () {
            return this.init.prototype.extend(this)
        }
    }, a = g.WordArray = z.extend({
        init: function (b, d) {
            b = this.words = b || [];
            this.sigBytes = d != e ? d : 4 * b.length
        }, toString: function (b) {
            return (b || o).stringify(this)
        }, concat: function (b) {
            var p = this.words, n = b.words, l = this.sigBytes;
            b = b.sigBytes;
            this.clamp();
            if (l % 4) {
                for (var d = 0; d < b; d++) {
                    p[l + d >>> 2] |= (n[d >>> 2] >>> 24 - 8 * (d % 4) & 255) << 24 - 8 * ((l + d) % 4)
                }
            } else {
                if (65535 < n.length) {
                    for (d = 0; d < b; d += 4) {
                        p[l + d >>> 2] = n[d >>> 2]
                    }
                } else {
                    p.push.apply(p, n)
                }
            }
            this.sigBytes += b;
            return this
        }, clamp: function () {
            var b = this.words, d = this.sigBytes;
            b[d >>> 2] &= 4294967295 << 32 - 8 * (d % 4);
            b.length = y.ceil(d / 4)
        }, clone: function () {
            var b = z.clone.call(this);
            b.words = this.words.slice(0);
            return b
        }, random: function (b) {
            for (var l = [], d = 0; d < b; d += 4) {
                l.push(4294967296 * y.random() | 0)
            }
            return new a.init(l, b)
        }
    }), m = h.enc = {}, o = m.Hex = {
        stringify: function (b) {
            var p = b.words;
            b = b.sigBytes;
            for (var n = [], l = 0; l < b; l++) {
                var d = p[l >>> 2] >>> 24 - 8 * (l % 4) & 255;
                n.push((d >>> 4).toString(16));
                n.push((d & 15).toString(16))
            }
            return n.join("")
        }, parse: function (b) {
            for (var n = b.length, l = [], d = 0; d < n; d += 2) {
                l[d >>> 3] |= parseInt(b.substr(d, 2), 16) << 24 - 4 * (d % 8)
            }
            return new a.init(l, n / 2)
        }
    }, j = m.Latin1 = {
        stringify: function (b) {
            var n = b.words;
            b = b.sigBytes;
            for (var l = [], d = 0; d < b; d++) {
                l.push(String.fromCharCode(n[d >>> 2] >>> 24 - 8 * (d % 4) & 255))
            }
            return l.join("")
        }, parse: function (b) {
            for (var n = b.length, l = [], d = 0; d < n; d++) {
                l[d >>> 2] |= (b.charCodeAt(d) & 255) << 24 - 8 * (d % 4)
            }
            return new a.init(l, n)
        }
    }, k = m.Utf8 = {
        stringify: function (b) {
            try {
                //console.log(b)
                //console.log(j.stringify(b))
                // console.log(escape(j.stringify(b)))
                // console.log(decodeURIComponent(escape(j.stringify(b))))
                return decodeURIComponent(escape(j.stringify(b)))
            } catch (d) {
                throw Error("Malformed UTF-8 data")
            }
        }, parse: function (b) {
            return j.parse(unescape(encodeURIComponent(b)))
        }
    }, c = g.BufferedBlockAlgorithm = z.extend({
        reset: function () {
            this._data = new a.init;
            this._nDataBytes = 0
        }, _append: function (b) {
            "string" == typeof b && (b = k.parse(b));
            this._data.concat(b);
            this._nDataBytes += b.sigBytes
        }, _process: function (l) {
            var t = this._data, s = t.words, p = t.sigBytes, n = this.blockSize, d = p / (4 * n),
                d = l ? y.ceil(d) : y.max((d | 0) - this._minBufferSize, 0);
            l = d * n;
            p = y.min(4 * l, p);
            if (l) {
                for (var r = 0; r < l; r += n) {
                    this._doProcessBlock(s, r)
                }
                r = s.splice(0, l);
                t.sigBytes -= p
            }
            return new a.init(r, p)
        }, clone: function () {
            var b = z.clone.call(this);
            b._data = this._data.clone();
            return b
        }, _minBufferSize: 0
    });
    g.Hasher = c.extend({
        cfg: z.extend(), init: function (b) {
            this.cfg = this.cfg.extend(b);
            this.reset()
        }, reset: function () {
            c.reset.call(this);
            this._doReset()
        }, update: function (b) {
            this._append(b);
            this._process();
            return this
        }, finalize: function (b) {
            b && this._append(b);
            return this._doFinalize()
        }, blockSize: 16, _createHelper: function (b) {
            return function (d, l) {
                return (new b.init(l)).finalize(d)
            }
        }, _createHmacHelper: function (b) {
            return function (d, l) {
                return (new f.HMAC.init(b, l)).finalize(d)
            }
        }
    });
    var f = h.algo = {};
    return h
}(Math);
(function () {
    var a = CryptoJS, b = a.lib.WordArray;
    a.enc.Base64 = {
        stringify: function (k) {
            var e = k.words, j = k.sigBytes, g = this._map;
            k.clamp();
            k = [];
            for (var h = 0; h < j; h += 3) {
                for (var c = (e[h >>> 2] >>> 24 - 8 * (h % 4) & 255) << 16 | (e[h + 1 >>> 2] >>> 24 - 8 * ((h + 1) % 4) & 255) << 8 | e[h + 2 >>> 2] >>> 24 - 8 * ((h + 2) % 4) & 255, f = 0; 4 > f && h + 0.75 * f < j; f++) {
                    k.push(g.charAt(c >>> 6 * (3 - f) & 63))
                }
            }
            if (e = g.charAt(64)) {
                for (; k.length % 4;) {
                    k.push(e)
                }
            }
            return k.join("")
        }, parse: function (m) {
            var f = m.length, j = this._map, h = j.charAt(64);
            h && (h = m.indexOf(h), -1 != h && (f = h));
            for (var h = [], k = 0, e = 0; e < f; e++) {
                if (e % 4) {
                    var g = j.indexOf(m.charAt(e - 1)) << 2 * (e % 4), c = j.indexOf(m.charAt(e)) >>> 6 - 2 * (e % 4);
                    h[k >>> 2] |= (g | c) << 24 - 8 * (k % 4);
                    k++
                }
            }
            return b.create(h, k)
        }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
    }
})();
(function (m) {
    function c(d, t, l, s, r, q, p) {
        d = d + (t & l | ~t & s) + r + p;
        return (d << q | d >>> 32 - q) + t
    }

    function f(d, t, l, s, r, q, p) {
        d = d + (t & s | l & ~s) + r + p;
        return (d << q | d >>> 32 - q) + t
    }

    function e(d, t, l, s, r, q, p) {
        d = d + (t ^ l ^ s) + r + p;
        return (d << q | d >>> 32 - q) + t
    }

    function o(d, t, l, s, r, q, p) {
        d = d + (l ^ (t | ~s)) + r + p;
        return (d << q | d >>> 32 - q) + t
    }

    for (var n = CryptoJS, a = n.lib, j = a.WordArray, k = a.Hasher, a = n.algo, g = [], h = 0; 64 > h; h++) {
        g[h] = 4294967296 * m.abs(m.sin(h + 1)) | 0
    }
    a = a.MD5 = k.extend({
        _doReset: function () {
            this._hash = new j.init([1732584193, 4023233417, 2562383102, 271733878])
        }, _doProcessBlock: function (K, M) {
            for (var V = 0; 16 > V; V++) {
                var U = M + V, T = K[U];
                K[U] = (T << 8 | T >>> 24) & 16711935 | (T << 24 | T >>> 8) & 4278255360
            }
            var V = this._hash.words, U = K[M + 0], T = K[M + 1], P = K[M + 2], O = K[M + 3], b = K[M + 4],
                I = K[M + 5], F = K[M + 6], l = K[M + 7], p = K[M + 8], L = K[M + 9], J = K[M + 10], H = K[M + 11],
                s = K[M + 12], G = K[M + 13], y = K[M + 14], d = K[M + 15], S = V[0], N = V[1], R = V[2], Q = V[3],
                S = c(S, N, R, Q, U, 7, g[0]), Q = c(Q, S, N, R, T, 12, g[1]), R = c(R, Q, S, N, P, 17, g[2]),
                N = c(N, R, Q, S, O, 22, g[3]), S = c(S, N, R, Q, b, 7, g[4]), Q = c(Q, S, N, R, I, 12, g[5]),
                R = c(R, Q, S, N, F, 17, g[6]), N = c(N, R, Q, S, l, 22, g[7]), S = c(S, N, R, Q, p, 7, g[8]),
                Q = c(Q, S, N, R, L, 12, g[9]), R = c(R, Q, S, N, J, 17, g[10]), N = c(N, R, Q, S, H, 22, g[11]),
                S = c(S, N, R, Q, s, 7, g[12]), Q = c(Q, S, N, R, G, 12, g[13]), R = c(R, Q, S, N, y, 17, g[14]),
                N = c(N, R, Q, S, d, 22, g[15]), S = f(S, N, R, Q, T, 5, g[16]), Q = f(Q, S, N, R, F, 9, g[17]),
                R = f(R, Q, S, N, H, 14, g[18]), N = f(N, R, Q, S, U, 20, g[19]), S = f(S, N, R, Q, I, 5, g[20]),
                Q = f(Q, S, N, R, J, 9, g[21]), R = f(R, Q, S, N, d, 14, g[22]), N = f(N, R, Q, S, b, 20, g[23]),
                S = f(S, N, R, Q, L, 5, g[24]), Q = f(Q, S, N, R, y, 9, g[25]), R = f(R, Q, S, N, O, 14, g[26]),
                N = f(N, R, Q, S, p, 20, g[27]), S = f(S, N, R, Q, G, 5, g[28]), Q = f(Q, S, N, R, P, 9, g[29]),
                R = f(R, Q, S, N, l, 14, g[30]), N = f(N, R, Q, S, s, 20, g[31]), S = e(S, N, R, Q, I, 4, g[32]),
                Q = e(Q, S, N, R, p, 11, g[33]), R = e(R, Q, S, N, H, 16, g[34]), N = e(N, R, Q, S, y, 23, g[35]),
                S = e(S, N, R, Q, T, 4, g[36]), Q = e(Q, S, N, R, b, 11, g[37]), R = e(R, Q, S, N, l, 16, g[38]),
                N = e(N, R, Q, S, J, 23, g[39]), S = e(S, N, R, Q, G, 4, g[40]), Q = e(Q, S, N, R, U, 11, g[41]),
                R = e(R, Q, S, N, O, 16, g[42]), N = e(N, R, Q, S, F, 23, g[43]), S = e(S, N, R, Q, L, 4, g[44]),
                Q = e(Q, S, N, R, s, 11, g[45]), R = e(R, Q, S, N, d, 16, g[46]), N = e(N, R, Q, S, P, 23, g[47]),
                S = o(S, N, R, Q, U, 6, g[48]), Q = o(Q, S, N, R, l, 10, g[49]), R = o(R, Q, S, N, y, 15, g[50]),
                N = o(N, R, Q, S, I, 21, g[51]), S = o(S, N, R, Q, s, 6, g[52]), Q = o(Q, S, N, R, O, 10, g[53]),
                R = o(R, Q, S, N, J, 15, g[54]), N = o(N, R, Q, S, T, 21, g[55]), S = o(S, N, R, Q, p, 6, g[56]),
                Q = o(Q, S, N, R, d, 10, g[57]), R = o(R, Q, S, N, F, 15, g[58]), N = o(N, R, Q, S, G, 21, g[59]),
                S = o(S, N, R, Q, b, 6, g[60]), Q = o(Q, S, N, R, H, 10, g[61]), R = o(R, Q, S, N, P, 15, g[62]),
                N = o(N, R, Q, S, L, 21, g[63]);
            V[0] = V[0] + S | 0;
            V[1] = V[1] + N | 0;
            V[2] = V[2] + R | 0;
            V[3] = V[3] + Q | 0
        }, _doFinalize: function () {
            var d = this._data, r = d.words, l = 8 * this._nDataBytes, q = 8 * d.sigBytes;
            r[q >>> 5] |= 128 << 24 - q % 32;
            var p = m.floor(l / 4294967296);
            r[(q + 64 >>> 9 << 4) + 15] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360;
            r[(q + 64 >>> 9 << 4) + 14] = (l << 8 | l >>> 24) & 16711935 | (l << 24 | l >>> 8) & 4278255360;
            d.sigBytes = 4 * (r.length + 1);
            this._process();
            d = this._hash;
            r = d.words;
            for (l = 0; 4 > l; l++) {
                q = r[l], r[l] = (q << 8 | q >>> 24) & 16711935 | (q << 24 | q >>> 8) & 4278255360
            }
            return d
        }, clone: function () {
            var d = k.clone.call(this);
            d._hash = this._hash.clone();
            return d
        }
    });
    n.MD5 = k._createHelper(a);
    n.HmacMD5 = k._createHmacHelper(a)
})(Math);
(function () {
    var b = CryptoJS, e = b.lib, f = e.Base, a = e.WordArray, e = b.algo, c = e.EvpKDF = f.extend({
        cfg: f.extend({keySize: 4, hasher: e.MD5, iterations: 1}), init: function (g) {
            this.cfg = this.cfg.extend(g)
        }, compute: function (l, g) {
            for (var j = this.cfg, v = j.hasher.create(), m = a.create(), t = m.words, h = j.keySize, j = j.iterations; t.length < h;) {
                k && v.update(k);
                var k = v.update(l).finalize(g);
                v.reset();
                for (var o = 1; o < j; o++) {
                    k = v.finalize(k), v.reset()
                }
                m.concat(k)
            }
            m.sigBytes = 4 * h;
            return m
        }
    });
    b.EvpKDF = function (j, g, h) {
        return c.create(h).compute(j, g)
    }
})();
CryptoJS.lib.Cipher || function (C) {
    var g = CryptoJS, k = g.lib, j = k.Base, E = k.WordArray, D = k.BufferedBlockAlgorithm, e = g.enc.Base64,
        A = g.algo.EvpKDF, B = k.Cipher = D.extend({
            cfg: j.extend(), createEncryptor: function (c, b) {
                return this.create(this._ENC_XFORM_MODE, c, b)
            }, createDecryptor: function (c, b) {
                return this.create(this._DEC_XFORM_MODE, c, b)
            }, init: function (l, d, c) {
                this.cfg = this.cfg.extend(c);
                this._xformMode = l;
                this._key = d;
                this.reset()
            }, reset: function () {
                D.reset.call(this);
                this._doReset()
            }, process: function (a) {
                this._append(a);
                return this._process()
            }, finalize: function (a) {
                a && this._append(a);
                return this._doFinalize()
            }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function (a) {
                return {
                    encrypt: function (c, l, n) {
                        return ("string" == typeof l ? m : y).encrypt(a, c, l, n)
                    }, decrypt: function (c, l, n) {
                        return ("string" == typeof l ? m : y).decrypt(a, c, l, n)
                    }
                }
            }
        });
    k.StreamCipher = B.extend({
        _doFinalize: function () {
            return this._process(!0)
        }, blockSize: 1
    });
    var o = g.mode = {}, z = function (p, n, l) {
        var r = this._iv;
        r ? this._iv = C : r = this._prevBlock;
        for (var q = 0; q < l; q++) {
            p[n + q] ^= r[q]
        }
    }, f = (k.BlockCipherMode = j.extend({
        createEncryptor: function (c, b) {
            return this.Encryptor.create(c, b)
        }, createDecryptor: function (c, b) {
            return this.Decryptor.create(c, b)
        }, init: function (c, b) {
            this._cipher = c;
            this._iv = b
        }
    })).extend();
    f.Encryptor = f.extend({
        processBlock: function (n, l) {
            var d = this._cipher, p = d.blockSize;
            z.call(this, n, l, p);
            d.encryptBlock(n, l);
            this._prevBlock = n.slice(l, l + p)
        }
    });
    f.Decryptor = f.extend({
        processBlock: function (p, n) {
            var l = this._cipher, r = l.blockSize, q = p.slice(n, n + r);
            l.decryptBlock(p, n);
            z.call(this, p, n, r);
            this._prevBlock = q
        }
    });
    o = o.CBC = f;
    f = (g.pad = {}).Pkcs7 = {
        pad: function (r, p) {
            for (var u = 4 * p, u = u - r.sigBytes % u, s = u << 24 | u << 16 | u << 8 | u, q = [], t = 0; t < u; t += 4) {
                q.push(s)
            }
            u = E.create(q, u);
            r.concat(u)
        }, unpad: function (b) {
            b.sigBytes -= b.words[b.sigBytes - 1 >>> 2] & 255
        }
    };
    k.BlockCipher = B.extend({
        cfg: B.cfg.extend({mode: o, padding: f}), reset: function () {
            B.reset.call(this);
            var l = this.cfg, d = l.iv, l = l.mode;
            if (this._xformMode == this._ENC_XFORM_MODE) {
                var n = l.createEncryptor
            } else {
                n = l.createDecryptor, this._minBufferSize = 1
            }
            this._mode = n.call(l, this, d && d.words)
        }, _doProcessBlock: function (d, c) {
            this._mode.processBlock(d, c)
        }, _doFinalize: function () {
            var d = this.cfg.padding;
            if (this._xformMode == this._ENC_XFORM_MODE) {
                d.pad(this._data, this.blockSize);
                var c = this._process(!0)
            } else {
                c = this._process(!0), d.unpad(c)
            }
            return c
        }, blockSize: 4
    });
    var h = k.CipherParams = j.extend({
        init: function (b) {
            this.mixIn(b)
        }, toString: function (b) {
            return (b || this.formatter).stringify(this)
        }
    }), o = (g.format = {}).OpenSSL = {
        stringify: function (d) {
            var c = d.ciphertext;
            d = d.salt;
            return (d ? E.create([1398893684, 1701076831]).concat(d).concat(c) : c).toString(e)
        }, parse: function (l) {
            l = e.parse(l);
            var d = l.words;
            if (1398893684 == d[0] && 1701076831 == d[1]) {
                var n = E.create(d.slice(2, 4));
                d.splice(0, 4);
                l.sigBytes -= 16
            }
            return h.create({ciphertext: l, salt: n})
        }
    }, y = k.SerializableCipher = j.extend({
        cfg: j.extend({format: o}), encrypt: function (q, n, s, r) {
            r = this.cfg.extend(r);
            var p = q.createEncryptor(s, r);
            n = p.finalize(n);
            p = p.cfg;
            return h.create({
                ciphertext: n,
                key: s,
                iv: p.iv,
                algorithm: q,
                mode: p.mode,
                padding: p.padding,
                blockSize: q.blockSize,
                formatter: r.format
            })
        }, decrypt: function (n, l, q, p) {
            p = this.cfg.extend(p);
            l = this._parse(l, p.format);
            return n.createDecryptor(q, p).finalize(l.ciphertext)
        }, _parse: function (d, c) {
            return "string" == typeof d ? c.parse(d, this) : d
        }
    }), g = (g.kdf = {}).OpenSSL = {
        execute: function (n, l, q, p) {
            p || (p = E.random(8));
            n = A.create({keySize: l + q}).compute(n, p);
            q = E.create(n.words.slice(l), 4 * q);
            n.sigBytes = 4 * l;
            return h.create({key: n, iv: q, salt: p})
        }
    }, m = k.PasswordBasedCipher = y.extend({
        cfg: y.cfg.extend({kdf: g}), encrypt: function (a, q, p, n) {
            n = this.cfg.extend(n);
            p = n.kdf.execute(p, a.keySize, a.ivSize);
            n.iv = p.iv;
            a = y.encrypt.call(this, a, q, p.key, n);
            a.mixIn(p);
            return a
        }, decrypt: function (a, q, p, n) {
            n = this.cfg.extend(n);
            q = this._parse(q, n.format);
            p = n.kdf.execute(p, a.keySize, a.ivSize, q.salt);
            n.iv = p.iv;
            return y.decrypt.call(this, a, q, p.key, n)
        }
    })
}();
(function () {
    for (var D = CryptoJS, L = D.lib.BlockCipher, R = D.algo, N = [], I = [], E = [], J = [], o = [], B = [], T = [], h = [], K = [], M = [], U = [], S = 0; 256 > S; S++) {
        U[S] = 128 > S ? S << 1 : S << 1 ^ 283
    }
    for (var Q = 0, P = 0, S = 0; 256 > S; S++) {
        var O = P ^ P << 1 ^ P << 2 ^ P << 3 ^ P << 4, O = O >>> 8 ^ O & 255 ^ 99;
        N[Q] = O;
        I[O] = Q;
        var f = U[Q], C = U[f], A = U[C], g = 257 * U[O] ^ 16843008 * O;
        E[Q] = g << 24 | g >>> 8;
        J[Q] = g << 16 | g >>> 16;
        o[Q] = g << 8 | g >>> 24;
        B[Q] = g;
        g = 16843009 * A ^ 65537 * C ^ 257 * f ^ 16843008 * Q;
        T[O] = g << 24 | g >>> 8;
        h[O] = g << 16 | g >>> 16;
        K[O] = g << 8 | g >>> 24;
        M[O] = g;
        Q ? (Q = f ^ U[U[U[A ^ f]]], P ^= U[U[P]]) : Q = P = 1
    }
    var m = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], R = R.AES = L.extend({
        _doReset: function () {
            for (var b = this._key, r = b.words, q = b.sigBytes / 4, b = 4 * ((this._nRounds = q + 6) + 1), p = this._keySchedule = [], n = 0; n < b; n++) {
                if (n < q) {
                    p[n] = r[n]
                } else {
                    var l = p[n - 1];
                    n % q ? 6 < q && 4 == n % q && (l = N[l >>> 24] << 24 | N[l >>> 16 & 255] << 16 | N[l >>> 8 & 255] << 8 | N[l & 255]) : (l = l << 8 | l >>> 24, l = N[l >>> 24] << 24 | N[l >>> 16 & 255] << 16 | N[l >>> 8 & 255] << 8 | N[l & 255], l ^= m[n / q | 0] << 24);
                    p[n] = p[n - q] ^ l
                }
            }
            r = this._invKeySchedule = [];
            for (q = 0; q < b; q++) {
                n = b - q, l = q % 4 ? p[n] : p[n - 4], r[q] = 4 > q || 4 >= n ? l : T[N[l >>> 24]] ^ h[N[l >>> 16 & 255]] ^ K[N[l >>> 8 & 255]] ^ M[N[l & 255]]
            }
        }, encryptBlock: function (d, c) {
            this._doCryptBlock(d, c, this._keySchedule, E, J, o, B, N)
        }, decryptBlock: function (b, j) {
            var e = b[j + 1];
            b[j + 1] = b[j + 3];
            b[j + 3] = e;
            this._doCryptBlock(b, j, this._invKeySchedule, T, h, K, M, I);
            e = b[j + 1];
            b[j + 1] = b[j + 3];
            b[j + 3] = e
        }, _doCryptBlock: function (ad, ac, ab, aa, Z, V, G, Y) {
            for (var F = this._nRounds, X = ad[ac] ^ ab[0], W = ad[ac + 1] ^ ab[1], H = ad[ac + 2] ^ ab[2], z = ad[ac + 3] ^ ab[3], y = 4, w = 1; w < F; w++) {
                var x = aa[X >>> 24] ^ Z[W >>> 16 & 255] ^ V[H >>> 8 & 255] ^ G[z & 255] ^ ab[y++],
                    v = aa[W >>> 24] ^ Z[H >>> 16 & 255] ^ V[z >>> 8 & 255] ^ G[X & 255] ^ ab[y++],
                    u = aa[H >>> 24] ^ Z[z >>> 16 & 255] ^ V[X >>> 8 & 255] ^ G[W & 255] ^ ab[y++],
                    z = aa[z >>> 24] ^ Z[X >>> 16 & 255] ^ V[W >>> 8 & 255] ^ G[H & 255] ^ ab[y++], X = x, W = v, H = u
            }
            x = (Y[X >>> 24] << 24 | Y[W >>> 16 & 255] << 16 | Y[H >>> 8 & 255] << 8 | Y[z & 255]) ^ ab[y++];
            v = (Y[W >>> 24] << 24 | Y[H >>> 16 & 255] << 16 | Y[z >>> 8 & 255] << 8 | Y[X & 255]) ^ ab[y++];
            u = (Y[H >>> 24] << 24 | Y[z >>> 16 & 255] << 16 | Y[X >>> 8 & 255] << 8 | Y[W & 255]) ^ ab[y++];
            z = (Y[z >>> 24] << 24 | Y[X >>> 16 & 255] << 16 | Y[W >>> 8 & 255] << 8 | Y[H & 255]) ^ ab[y++];
            ad[ac] = x;
            ad[ac + 1] = v;
            ad[ac + 2] = u;
            ad[ac + 3] = z
        }, keySize: 8
    });
    D.AES = L._createHelper(R)
})();

function Base64() {
    _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    this.encode = function (c) {
        var a = "";
        var k, h, f, j, g, e, d;
        var b = 0;
        c = _utf8_encode(c);
        while (b < c.length) {
            k = c.charCodeAt(b++);
            h = c.charCodeAt(b++);
            f = c.charCodeAt(b++);
            j = k >> 2;
            g = ((k & 3) << 4) | (h >> 4);
            e = ((h & 15) << 2) | (f >> 6);
            d = f & 63;
            if (isNaN(h)) {
                e = d = 64
            } else {
                if (isNaN(f)) {
                    d = 64
                }
            }
            a = a + _keyStr.charAt(j) + _keyStr.charAt(g) + _keyStr.charAt(e) + _keyStr.charAt(d)
        }
        return a
    };
    this.decode = function (c) {
        var a = "";
        var k, h, f;
        var j, g, e, d;
        var b = 0;
        c = c.replace(/[^A-Za-z0-9\+\/\=]/g, "");
        while (b < c.length) {
            j = _keyStr.indexOf(c.charAt(b++));
            g = _keyStr.indexOf(c.charAt(b++));
            e = _keyStr.indexOf(c.charAt(b++));
            d = _keyStr.indexOf(c.charAt(b++));
            k = (j << 2) | (g >> 4);
            h = ((g & 15) << 4) | (e >> 2);
            f = ((e & 3) << 6) | d;
            a = a + String.fromCharCode(k);
            if (e != 64) {
                a = a + String.fromCharCode(h)
            }
            if (d != 64) {
                a = a + String.fromCharCode(f)
            }
        }
        a = _utf8_decode(a);
        return a
    };
    _utf8_encode = function (b) {
        b = b.replace(/\r\n/g, "\n");
        var a = "";
        for (var e = 0; e < b.length; e++) {
            var d = b.charCodeAt(e);
            if (d < 128) {
                a += String.fromCharCode(d)
            } else {
                if ((d > 127) && (d < 2048)) {
                    a += String.fromCharCode((d >> 6) | 192);
                    a += String.fromCharCode((d & 63) | 128)
                } else {
                    a += String.fromCharCode((d >> 12) | 224);
                    a += String.fromCharCode(((d >> 6) & 63) | 128);
                    a += String.fromCharCode((d & 63) | 128)
                }
            }
        }
        return a
    };
    _utf8_decode = function (a) {
        var b = "";
        var d = 0;
        var e = c1 = c2 = 0;
        while (d < a.length) {
            e = a.charCodeAt(d);
            if (e < 128) {
                b += String.fromCharCode(e);
                d++
            } else {
                if ((e > 191) && (e < 224)) {
                    c2 = a.charCodeAt(d + 1);
                    b += String.fromCharCode(((e & 31) << 6) | (c2 & 63));
                    d += 2
                } else {
                    c2 = a.charCodeAt(d + 1);
                    c3 = a.charCodeAt(d + 2);
                    b += String.fromCharCode(((e & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                    d += 3
                }
            }
        }
        return b
    }
}

var hexcase = 0;
var b64pad = "";
var chrsz = 8;

function hex_md5(a) {
    return binl2hex(core_md5(str2binl(a), a.length * chrsz))
}

function b64_md5(a) {
    return binl2b64(core_md5(str2binl(a), a.length * chrsz))
}

function str_md5(a) {
    return binl2str(core_md5(str2binl(a), a.length * chrsz))
}

function hex_hmac_md5(a, b) {
    return binl2hex(core_hmac_md5(a, b))
}

function b64_hmac_md5(a, b) {
    return binl2b64(core_hmac_md5(a, b))
}

function str_hmac_md5(a, b) {
    return binl2str(core_hmac_md5(a, b))
}

function md5_vm_test() {
    return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"
}

function core_md5(p, k) {
    p[k >> 5] |= 128 << ((k) % 32);
    p[(((k + 64) >>> 9) << 4) + 14] = k;
    var o = 1732584193;
    var n = -271733879;
    var m = -1732584194;
    var l = 271733878;
    for (var g = 0; g < p.length; g += 16) {
        var j = o;
        var h = n;
        var f = m;
        var e = l;
        o = md5_ff(o, n, m, l, p[g + 0], 7, -680876936);
        l = md5_ff(l, o, n, m, p[g + 1], 12, -389564586);
        m = md5_ff(m, l, o, n, p[g + 2], 17, 606105819);
        n = md5_ff(n, m, l, o, p[g + 3], 22, -1044525330);
        o = md5_ff(o, n, m, l, p[g + 4], 7, -176418897);
        l = md5_ff(l, o, n, m, p[g + 5], 12, 1200080426);
        m = md5_ff(m, l, o, n, p[g + 6], 17, -1473231341);
        n = md5_ff(n, m, l, o, p[g + 7], 22, -45705983);
        o = md5_ff(o, n, m, l, p[g + 8], 7, 1770035416);
        l = md5_ff(l, o, n, m, p[g + 9], 12, -1958414417);
        m = md5_ff(m, l, o, n, p[g + 10], 17, -42063);
        n = md5_ff(n, m, l, o, p[g + 11], 22, -1990404162);
        o = md5_ff(o, n, m, l, p[g + 12], 7, 1804603682);
        l = md5_ff(l, o, n, m, p[g + 13], 12, -40341101);
        m = md5_ff(m, l, o, n, p[g + 14], 17, -1502002290);
        n = md5_ff(n, m, l, o, p[g + 15], 22, 1236535329);
        o = md5_gg(o, n, m, l, p[g + 1], 5, -165796510);
        l = md5_gg(l, o, n, m, p[g + 6], 9, -1069501632);
        m = md5_gg(m, l, o, n, p[g + 11], 14, 643717713);
        n = md5_gg(n, m, l, o, p[g + 0], 20, -373897302);
        o = md5_gg(o, n, m, l, p[g + 5], 5, -701558691);
        l = md5_gg(l, o, n, m, p[g + 10], 9, 38016083);
        m = md5_gg(m, l, o, n, p[g + 15], 14, -660478335);
        n = md5_gg(n, m, l, o, p[g + 4], 20, -405537848);
        o = md5_gg(o, n, m, l, p[g + 9], 5, 568446438);
        l = md5_gg(l, o, n, m, p[g + 14], 9, -1019803690);
        m = md5_gg(m, l, o, n, p[g + 3], 14, -187363961);
        n = md5_gg(n, m, l, o, p[g + 8], 20, 1163531501);
        o = md5_gg(o, n, m, l, p[g + 13], 5, -1444681467);
        l = md5_gg(l, o, n, m, p[g + 2], 9, -51403784);
        m = md5_gg(m, l, o, n, p[g + 7], 14, 1735328473);
        n = md5_gg(n, m, l, o, p[g + 12], 20, -1926607734);
        o = md5_hh(o, n, m, l, p[g + 5], 4, -378558);
        l = md5_hh(l, o, n, m, p[g + 8], 11, -2022574463);
        m = md5_hh(m, l, o, n, p[g + 11], 16, 1839030562);
        n = md5_hh(n, m, l, o, p[g + 14], 23, -35309556);
        o = md5_hh(o, n, m, l, p[g + 1], 4, -1530992060);
        l = md5_hh(l, o, n, m, p[g + 4], 11, 1272893353);
        m = md5_hh(m, l, o, n, p[g + 7], 16, -155497632);
        n = md5_hh(n, m, l, o, p[g + 10], 23, -1094730640);
        o = md5_hh(o, n, m, l, p[g + 13], 4, 681279174);
        l = md5_hh(l, o, n, m, p[g + 0], 11, -358537222);
        m = md5_hh(m, l, o, n, p[g + 3], 16, -722521979);
        n = md5_hh(n, m, l, o, p[g + 6], 23, 76029189);
        o = md5_hh(o, n, m, l, p[g + 9], 4, -640364487);
        l = md5_hh(l, o, n, m, p[g + 12], 11, -421815835);
        m = md5_hh(m, l, o, n, p[g + 15], 16, 530742520);
        n = md5_hh(n, m, l, o, p[g + 2], 23, -995338651);
        o = md5_ii(o, n, m, l, p[g + 0], 6, -198630844);
        l = md5_ii(l, o, n, m, p[g + 7], 10, 1126891415);
        m = md5_ii(m, l, o, n, p[g + 14], 15, -1416354905);
        n = md5_ii(n, m, l, o, p[g + 5], 21, -57434055);
        o = md5_ii(o, n, m, l, p[g + 12], 6, 1700485571);
        l = md5_ii(l, o, n, m, p[g + 3], 10, -1894986606);
        m = md5_ii(m, l, o, n, p[g + 10], 15, -1051523);
        n = md5_ii(n, m, l, o, p[g + 1], 21, -2054922799);
        o = md5_ii(o, n, m, l, p[g + 8], 6, 1873313359);
        l = md5_ii(l, o, n, m, p[g + 15], 10, -30611744);
        m = md5_ii(m, l, o, n, p[g + 6], 15, -1560198380);
        n = md5_ii(n, m, l, o, p[g + 13], 21, 1309151649);
        o = md5_ii(o, n, m, l, p[g + 4], 6, -145523070);
        l = md5_ii(l, o, n, m, p[g + 11], 10, -1120210379);
        m = md5_ii(m, l, o, n, p[g + 2], 15, 718787259);
        n = md5_ii(n, m, l, o, p[g + 9], 21, -343485551);
        o = safe_add(o, j);
        n = safe_add(n, h);
        m = safe_add(m, f);
        l = safe_add(l, e)
    }
    return Array(o, n, m, l)
}

function md5_cmn(h, e, d, c, g, f) {
    return safe_add(bit_rol(safe_add(safe_add(e, h), safe_add(c, f)), g), d)
}

function md5_ff(g, f, l, k, e, j, h) {
    return md5_cmn((f & l) | ((~f) & k), g, f, e, j, h)
}

function md5_gg(g, f, l, k, e, j, h) {
    return md5_cmn((f & k) | (l & (~k)), g, f, e, j, h)
}

function md5_hh(g, f, l, k, e, j, h) {
    return md5_cmn(f ^ l ^ k, g, f, e, j, h)
}

function md5_ii(g, f, l, k, e, j, h) {
    return md5_cmn(l ^ (f | (~k)), g, f, e, j, h)
}

function core_hmac_md5(c, f) {
    var e = str2binl(c);
    if (e.length > 16) {
        e = core_md5(e, c.length * chrsz)
    }
    var a = Array(16), d = Array(16);
    for (var b = 0; b < 16; b++) {
        a[b] = e[b] ^ 909522486;
        d[b] = e[b] ^ 1549556828
    }
    var g = core_md5(a.concat(str2binl(f)), 512 + f.length * chrsz);
    return core_md5(d.concat(g), 512 + 128)
}

function safe_add(a, d) {
    var c = (a & 65535) + (d & 65535);
    var b = (a >> 16) + (d >> 16) + (c >> 16);
    return (b << 16) | (c & 65535)
}

function bit_rol(a, b) {
    return (a << b) | (a >>> (32 - b))
}

function str2binl(d) {
    var c = Array();
    var a = (1 << chrsz) - 1;
    for (var b = 0; b < d.length * chrsz; b += chrsz) {
        c[b >> 5] |= (d.charCodeAt(b / chrsz) & a) << (b % 32)
    }
    return c
}

function binl2str(c) {
    var d = "";
    var a = (1 << chrsz) - 1;
    for (var b = 0; b < c.length * 32; b += chrsz) {
        d += String.fromCharCode((c[b >> 5] >>> (b % 32)) & a)
    }
    return d
}

function binl2hex(c) {
    var b = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
    var d = "";
    for (var a = 0; a < c.length * 4; a++) {
        d += b.charAt((c[a >> 2] >> ((a % 4) * 8 + 4)) & 15) + b.charAt((c[a >> 2] >> ((a % 4) * 8)) & 15)
    }
    return d
}

function binl2b64(d) {
    var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    var f = "";
    for (var b = 0; b < d.length * 4; b += 3) {
        var e = (((d[b >> 2] >> 8 * (b % 4)) & 255) << 16) | (((d[b + 1 >> 2] >> 8 * ((b + 1) % 4)) & 255) << 8) | ((d[b + 2 >> 2] >> 8 * ((b + 2) % 4)) & 255);
        for (var a = 0; a < 4; a++) {
            if (b * 8 + a * 6 > d.length * 32) {
                f += b64pad
            } else {
                f += c.charAt((e >> 6 * (3 - a)) & 63)
            }
        }
    }
    return f
}

var base = new Base64();

function TransCode() {
    var b = String((new Date()).getTime());
    var c = randomString(16);
    var a = hex_md5(base.encode(hex_md5(b) + c) + c);
    this.headers = function (d) {
        var e = null;
        if (d == 1) {
            e = {tmencrypt: 1, tmtimestamp: b, tmrandomnum: c, tmencryptkey: a,}
        } else {
            if (d == 2) {
                e = [{objkey: "tmencrypt", objvalue: 1}, {objkey: "tmtimestamp", objvalue: b}, {
                    objkey: "tmrandomnum",
                    objvalue: c
                }, {objkey: "tmencryptkey", objvalue: a},]
            }
        }
        return e
    };
    this.encrypt = function (h) {
        // 原代码
        var f = JSON.stringify(h);
        var e = hex_md5(base.encode(b) + hex_md5(c)).substring(0, 16);
        var d = hex_md5(base.encode(c) + hex_md5(b)).substring(0, 16);
        var j = CryptoJS.enc.Utf8.parse(f);
        var g = CryptoJS.AES.encrypt(j, CryptoJS.enc.Utf8.parse(e), {
            iv: CryptoJS.enc.Utf8.parse(d),
            mode: CryptoJS.mode.CBC,
            padding: CryptoJS.pad.Pkcs7
        });
        return g.toString()

    };
    this.decrypt = function () {
        var g = null;
        if (arguments.length == 1) {
            g = arguments[0]
        } else {
            if (arguments.length == 3) {
                g = arguments[0];
                b = arguments[1];
                c = arguments[2]
            }
        }

        var f = CryptoJS.enc.Utf8.parse(hex_md5( base.encode(b) + hex_md5(b) ).substring(0, 16));
        var e = hex_md5(c).substring(0, 16);
        // g = CryptoJS.enc.Hex.parse(g);
        // g = CryptoJS.enc.Base64.parse(g);
        // g = base.decode(g);
        // let decData = CryptoJS.enc.Base64.stringify(g).toString(CryptoJS.enc.Utf8);
        var d = new CryptoJS.AES.decrypt(g, f, {
            iv: CryptoJS.enc.Utf8.parse(e),
            mode: CryptoJS.mode.CBC,
            padding: CryptoJS.pad.Pkcs7
        });

        // console.log(d.toString(CryptoJS.enc.Utf8))
        // console.log(JSON.parse(d.toString(CryptoJS.enc.Utf8).toString()))
        // return JSON.parse(d.toString().toString())
        return JSON.parse(CryptoJS.enc.Utf8.stringify(d).toString())
        // return  JSON.parse(d.toString(CryptoJS.enc.Utf8).toString());

    };
    this.httpsHeaders = function (d) {
        var e = null;
        if (d == 1) {
            e = {tmtimestampnew: b, tmrandomnumnew: c, tmencryptkeynew: a,}
        } else {
            if (d == 2) {
                e = [{objkey: "tmtimestampnew", objvalue: b}, {
                    objkey: "tmrandomnumnew",
                    objvalue: c
                }, {objkey: "tmencryptkeynew", objvalue: a},]
            }
        }
        return e
    }
}

function randomString(b) {
    b = b || 32;
    var c = "abcdefhijkmnprstwxyz2345678";
    var a = c.length;
    var d = "";
    for (i = 0; i < b; i++) {
        d += c.charAt(Math.floor(Math.random() * a))
    }
    return d
};